.chat-window {
  position: relative;
  height: calc(100vh - 180rpx);
  background-color: #f5f5f5;
  padding: 20rpx;
  box-sizing: border-box;
  display: flex;  
  flex-direction: column;  
}

.chat-content {
  width: 100%;
  flex: 1;  
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.message-wrapper {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30rpx;
  padding: 0 20rpx;
  box-sizing: border-box;
  
  &.message-right {
    flex-direction: row-reverse;
  }

  &.message-left {
    flex-direction: row;
  }
}

.avatar {
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #ffffff;
  // flex: 0 0 80rpx;
  
  &.avatar-left {
    background-color: #007AFF;
    margin-right: 20rpx;
  }
  
  &.avatar-right {
    background-color: #34C759;
    margin-left: 20rpx;
  }
}

.message-bubble {
  max-width: 60%;
  padding: 24rpx 32rpx;
  border-radius: 32rpx;
  word-break: break-all;
  
  &.bubble-left {
    background-color: #ffffff;
  }
  
  &.bubble-right {
    background-color: #007AFF;
    .message-text {
      color: #ffffff;
    }
  }
}

.message-text {
  font-size: 32rpx;
  line-height: 1.4;
}